package com.thb.pay.api.payment;


import com.thb.pay.api.payment.fallback.AgentpayPassageServiceApiFallbackFactory;
import com.thb.pay.api.payment.vo.req.AgentpayPassagePageReq;
import com.thb.pay.api.payment.vo.req.AgentpayPassageReq;
import com.thb.pay.api.payment.vo.resp.AgentpayPassageVo;
import com.thb.pay.core.utils.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 代付-通道表 前端控制器
 * </p>
 *
 * @author lucky
 * @since 2019-07-21
 */
@FeignClient(value = "pay-service", fallbackFactory = AgentpayPassageServiceApiFallbackFactory.class)
@RequestMapping("/agentpayPassageApi")
public interface AgentpayPassageServiceApi {

    @RequestMapping(value = "/findPage", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    PageResult<AgentpayPassageVo> findPage(@RequestBody AgentpayPassagePageReq pageReq);

    @RequestMapping(value = "/findAllList", method = RequestMethod.GET)
    List<AgentpayPassageVo> findAllList();

    @RequestMapping(value = "/getById", method = RequestMethod.GET)
    AgentpayPassageVo getById(@RequestParam("id") Long id);

    @RequestMapping(value = "/add", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void add(@RequestBody AgentpayPassageReq agentpayPassageReq);

    @RequestMapping(value = "/update", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void update(@RequestBody AgentpayPassageReq agentpayPassageReq);

    @RequestMapping(value = "/deleteBatchIds", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void deleteBatchIds(@RequestBody List<Long> ids);
}
